<?php
$url = "http://172.20.5.127:8080/geoserver/secretariaambiente/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=secretariaambiente:Formulario%20Ambiente&outputFormat=application/json";

function get_data($url){
	$ch = curl_init();
	$timeout = 5;
	curl_setopt($ch,CURLOPT_URL,$url);
	curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
	curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
	$data = curl_exec($ch);
	curl_close($ch);
	return $data;
}
//echo "<br>3:";

//print_r(get_data($url));

$json_output = json_decode(get_data($url));

//var_dump($json_output->features);

foreach ($json_output->features as $feature) {
        var_dump($feature);
echo "<br>";
echo "<br>";
echo "<br>";

} 


?>